// 类的用法

(()=>{
    interface IPerson {
        firstName:string 
        lastName:string 
    }
    
    class Person {
        // 定义属性
        firstName: string 
        lastName: string 
    
        // 构造器
        constructor(firstName: string, lastName: string) {
            this.firstName = firstName
            this.lastName= lastName
        }
    }

    function showName(person: IPerson) {
        return person.firstName+"_"+ person.lastName
    }

    const person = new Person('东西', '南北')

    console.log(showName(person))

})()
